﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lidgren.Network;

namespace Network.Messages.LiveControl
{
    public class ResponseScreenRectMessage : NovaMessage
    {
        public ResponseScreenRectMessage() : base((ushort)CustomMessageType.ResponseScreenRectMessage)
        {
        }

        public Rectangle Bounds;
        public override void WritePayload(NetOutgoingMessage message)
        {
            base.WritePayload(message);
            message.Write(Bounds.X);
            message.Write(Bounds.Y);
            message.Write(Bounds.Width);
            message.Write(Bounds.Height);
        }

        public override void ReadPayload(NetIncomingMessage message)
        {
            base.ReadPayload(message);
            Bounds = new Rectangle(
                message.ReadInt32(),
                message.ReadInt32(),
                message.ReadInt32(),
                message.ReadInt32()
                );
        }
    }
}
